<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>

    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

    <title>账单</title>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>

    <link rel="shortcut icon" href="favicon.ico"/>
    <link href="../css/bootstrap.min.css?v=3.3.6" th:href="@{/css/bootstrap.min.css?v=3.3.6}" rel="stylesheet"/>

    <!-- jqgrid-->
    <link href="../css/jqgrid/ui.jqgrid.css?0820" rel="stylesheet" th:href="@{/css/jqgrid/ui.jqgrid.css?0820}"/>
    <link href="../css/layui.css" rel="stylesheet" th:href="@{/css/layui.css}"/>
    <link href="../css/animate.css" rel="stylesheet" th:href="@{/css/animate.css}"/>
    <link href="../css/style.css" rel="stylesheet" th:href="@{/css/style.css?123213}"/>


</head>
<body class="full-body">
<div class="form-content">
    <div class="panel-body">


        <form class="form-inline" th:action="@{/sys/order/orderBillList}" id="orderBillListFrom">
            <div class="form-top">


                <div class="form-group">
                    <input type="text" name="mchId" lay-verify="num" placeholder="请输入商户编号" class="form-control"
                           lay-verType="alert"/>
                </div>


                <div class="form-group">
                    <button type="reset" class="layui-btn layui-btn-primary">
                        <i class="layui-icon">&#x1002;</i>重置
                    </button>
                    <button class="layui-btn submit-btn" id="billBtn" type="button">
                        <i class="layui-icon">&#xe615;</i>搜索
                    </button>
                </div>

            </div>
        </form>
    </div>

</div>

<div class="wrapper wrapper-content  animated fadeInRight">
    <div class="row">

        <!--搜索 条件 -->
        <form th:action="@{/sys/order/orderBillList}" id="selectForm"></form>
        <div class="col-sm-12">
            <div class="ibox ">
                <!--<div class="ibox-title">-->
                <!--<h5>jQuery Grid Plugin – jqGrid</h5>-->
                <!--</div>-->
                <div class="ibox-content">
                    <div class="jqGrid_wrapper">
                        <table id="table_list_12"></table>
                        <div id="pager_list_12"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 全局js -->
<div th:include="common/common_js :: onloadjs"></div>


<script type="text/javascript">
    $(document).ready(function () {
        var dataGrid = new DataGrid({
            dataGrid: $('#table_list_12'),
            searchForm: $('#orderBillListFrom'),
            dataGridPage: $('#pager_list_12'),

            rownumbers: true,
            rownumWidth: 60,
            colModel: [
                {
                    header: '商户名称',
                    name: 'agentName',

                    index: 'agentName',
                    editable: false,

                    width: 60,
                    // sorttype: "int",
                    sortable: false,
                    search: false
                },
                {
                    header: '日期',
                    name: 'tradeTime',

                    index: 'tradeTime',
                    editable: false,

                    width: 60,
                    // sorttype: "int",
                    sortable: false,
                    search: false
                }, {
                    header: '类型',
                    name: 'serviceType',

                    index: 'serviceType',
                    editable: false,

                    width: 60,
                    // sorttype: "int",
                    sortable: false,
                    search: false
                }, {
                    header: '交易成功笔数',
                    name: 'successCount',
                    index: 'successCount',
                    editable: false,
                    width: 60,
                    sortable: false,
                    search: false
                }, {
                    header: '交易成功金额',
                    name: 'successMoney',
                    index: 'successMoney',
                    editable: false,
                    width: 60,
                    sortable: false,
                    search: false
                }, {
                    header: '交易失败笔数',
                    name: 'failCount',
                    index: 'failCount',
                    editable: false,
                    width: 60,
                    sortable: false,
                    search: false
                }, {
                    header: '交易总笔数',
                    name: 'totalCount',
                    index: 'totalCount',
                    editable: false,
                    width: 60,
                    sortable: false,
                    search: false
                }
            ]
        })


        $("#billBtn").click(function () {
            $("#table_list_12").jqGrid('setGridParam', {
                datatype: 'json',
                postData: {
                    mchId: $('input[name=mchId]').val(),
                }, // 发送数据
                page: 1
            }).trigger("reloadGrid"); //重新载入
        });
    })
</script>

</body>
</html>